package com.tebiecloud.yunst.client.service;

import com.tebiecloud.common.model.ResultBody;
import com.tebiecloud.yunst.client.model.vo.RefundVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

public interface IYunRefundServiceClient {

    /**
     * 申请退款接口
     * @param userId //用户id
     * @param orderId //订单id
     * @param amount //退款金额（单位：分）
     * @return
     */
    @PostMapping("/feign/refund/create")
    ResultBody<RefundVO> create(
            @RequestParam(value = "userId") Long userId,
            @RequestParam(value = "orderId") Long orderId,
            @RequestParam(value = "amount") int amount);

    /**
     * 获取退款信息
     * @param orderId //订单id
     * @return
     */
    @PostMapping("/feign/refund/select")
    ResultBody<RefundVO> selectRefund(@RequestParam(value = "orderId") Long orderId);

}
